package com.smartgame.renderers;

import com.smartgame.controllers.AbstractController;
import com.smartgame.util.Constants;

public class GameRenderer extends AbstractRenderer {

	public GameRenderer(AbstractController controller) {
		super(controller);
	}

	@Override
	protected void updateBatchWithCamera() {
		controller.cameraHelper.applyTo(worldCamera);
		batch.setProjectionMatrix(worldCamera.combined);
	}
	
	@Override
	public void resize(int width, int height) {
		worldCamera.viewportWidth = (Constants.VIEWPORT_HEIGHT / height) * width;
		worldCamera.update();
	}

}
